<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>重定向（2）</title>
</head>
<body>
               <% 
               request.setCharacterEncoding("UTF-8");
               String name=request.getParameter("uname");
               String pwd=request.getParameter("upwd");
               //假设用户名为“张三”且密码为“abc”时，登录验证成功
               if(name.equals("蔡徐坤")&& pwd.equals("abc")){
            	   //若验证成功，则重定向到sus.jsp页面
            	  // response.sendRedirect("sus.jsp");
            	   request.getRequestDispatcher("sus.jsp").forward(request, response);
               }else{
            	   out.print("滚蛋！！！");
               }
                    %>
</body>
</html>